<template>
  <div class="container-fluid">
    <div class="row">
      <div class="col">
        <div v-for="(v, i) in gettemplates" class="float-left" :key="`${i}wechatpushs1`">
          <weixinmessage v-bind="{message: v, setdata}"></weixinmessage>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import weixinmessage from "@/components/weixin/message.vue";
// import { asyncupdateremark } from "../../../plugins/api.js";
export default {
  name: "wechatpushs",
  computed: {
    ...mapGetters("weixin", ["gettemplates"])
  },
  data() {
    return {
      temps: []
    };
  },
  mounted() {},
  methods: {
    setdata(v) {
      let y = this.temps.find(vo => vo.template_id === v.template_id);
      if (!y) {
        this.temps.push(v);
      } else {
        y = v;
      }
    }
  },
  components: {
    weixinmessage
  }
};
</script>

